#!/bin/sh

for COMPONENT in $@; do
    if [ ! -e $CHECKOUTS ]; then
        echo "Creating working directory for checkouts..."
        mkdir $CHECKOUTS
    fi
    CMD="svn co ${GOOGLE_BASE}/${COMPONENT}/trunk ${CHECKOUTS}/${COMPONENT}"
    echo "Checking out component '$COMPONENT' from svn with $CMD ..."
    $CMD
    DEPS_URLS="$DEPS_URLS `cat ${CHECKOUTS}/${COMPONENT}/DEPENDENCIES`"
done

./deps.sh $DEPS_URLS
